package com.pt.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pt.entity.ForumSection;
import com.pt.entity.ForumTopic;
import com.pt.entity.ForumReply;

import java.util.List;

public interface ForumService {
    
    List<ForumSection> getAllSections();
    
    IPage<ForumTopic> getTopicsBySection(Integer sectionId, Page<ForumTopic> page);
    
    ForumTopic getTopicById(Long topicId);
    
    IPage<ForumReply> getRepliesByTopic(Long topicId, Page<ForumReply> page);
    
    ForumTopic createTopic(ForumTopic topic);
    
    ForumReply createReply(ForumReply reply);
    
    void deleteTopic(Long topicId);
    
    void deleteReply(Long replyId);
    
    void increaseViewCount(Long topicId);
    
    void toggleSticky(Long topicId);
    
    void toggleLock(Long topicId);
    
    boolean isTopicAuthor(Long topicId, String username);
    
    boolean isReplyAuthor(Long replyId, String username);
} 